<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title><?php echo Yii::app()->name;?></title>
	<!-- blueprint CSS framework -->
	<link rel="shortcut icon" href="/favicon.ico"> 
	<?php Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/public/css/screen.css','screen, projection');?>
	<?php Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/public/css/print.css','print');?>
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/public/css/ie.css" media="screen, projection" />
	<![endif]-->
	<?php Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/public/css/form.css');?>


	<?php Yii::app()->controller->module->registerCss('default.css');?>
    
    <?php $this->widget('ext.msgbox.msgboxWidget'); ?>

	<script type="text/javascript">
		
	$(function(){
	   
        ajaxLoad();
       
		$(".tabs>a").click(function(){
	//		alert(this.href);
			$(this).siblings().removeClass('actived');
			$(this).addClass('actived');
	//		$("#content").html("loading...");
	//		$("#content").load(this.href);
///			return false;
		});
	
		$("#sidebar").resizable({
			minHeight: 140,
			resize: function() {
				$("#accordion").accordion("resize");
			}
		});

		$(".portlet-decoration").click(function(){
			$(this).next().slideToggle();
		});

//		$(".column1, .column2").addClass("sortable").sortable({
//			connectWith: '.sortable'
//		});

		$("#content").width($(window).width() - $("#sidebar").width()-60);


	
	//	$(".operations li a").click(function(){
	//		$("#content").load(this.href);
	//		return false;
	//	});
	
	
	
	
	
	//    $('.operations li a').live('click', function(e) {
	//            var url = $(this).attr('href');
	//            url = url.replace(/^.*#/, '');
	//            alert(url);
	//            $.history.load(url);
	//            return false;
	//    });
	});
    
    function ajaxLoad(){
        var h = ($(window).height()-$("#loading").height())/3;
		var w = ($(window).width()-$("#loading").width())/2;

		
		$("#loading").css({"top":h+'px',"left":w+'px'}).hide().ajaxStart(function(){			
			$(this).fadeIn();
		}).ajaxStop(function(){
			$(this).fadeOut();			
		});
    }
	
	//function load(num) {
	//    $('#content').load("admin/"+num);
	//}
	//
	//$.history.init(function(url) {
	//    $("#content").load(url == "" ? "default" : url);
	//});
	
	</script>
</head>
<body>
<div id="container">
	<div id="header">
	  	<div id="logo" ><?php echo CHtml::link(CHtml::image('/public/images/logo.png','Logo'),array('/site/index'));?></div>
	  	<div style="position:absolute;top:10px; right:10px; z-index:100;"><a href="<?php echo $this->createUrl('/site/logout');?>">注销</a>&nbsp;&nbsp;<?php echo Yii::app()->user->name;?></div>
	  	<div class="banner">
			<div class="tabbar">
			 	<div class="tabs">
				   <!--  <div class="float_icon"><?php ?></div> -->
				    <a href="<?php echo $this->createUrl('default/index');?>" title="<?php echo Yii::t('admin','Control Panel');?>" <?php if($this->id == 'default'):?> class="actived" <?php endif;?> style="margin-left:0;padding-left:0;"><?php echo Yii::t('admin', 'Control Panel');?></a> 
					<a href="<?php echo $this->createUrl('info/index');?>" title="<?php echo Yii::t('admin', 'Article Management')?>"  <?php if($this->id == 'info'):?> class="actived" <?php endif;?>><?php echo Yii::t('admin', 'Article')?></a> 
					<a href="<?php echo $this->createUrl('media/index');?>" title="<?php echo Yii::t('admin', 'Media Management')?>"  <?php if($this->id == 'media'):?> class="actived" <?php endif;?>><?php echo Yii::t('admin', 'Media')?></a> 
					<a href="<?php echo $this->createUrl('comment/index');?>" title="<?php echo Yii::t('admin', 'AC zone')?>"  <?php if($this->id == 'comment'):?> class="actived" <?php endif;?>><?php echo Yii::t('admin', 'AC zone')?></a> 
					<a href="<?php echo $this->createUrl('tools/index');?>" title="<?php echo Yii::t('admin', 'General Settings')?>"  <?php if($this->id == 'tools'):?> class="actived" <?php endif;?>><?php echo Yii::t('admin', 'Tools')?></a> 
				</div>
				<div class="bg">
				    <div class="nw"></div>
				    <div class="cen"></div>
				    <div class="cen"></div>
				    <div class="cen"></div>
				    <div class="ne"></div>
			  	</div>
			</div>
		</div>
		<div class="bar"></div>
	</div>
  	<div id="mainContent">
		<?php echo $content;?>
  	</div>  	
</div>
<div id="loading" style="position:fixed;width:130px;height:80px;text-align:center;padding-top:15px;background:url('/public/images/loading-bg.gif') no-repeat;" class="hide">
	<img src="/public/images/loading.gif" width="60"; />
</div>
</body>
</html>
